from src.entity.System import MultiStarSystem
from src.util.star_animation import StarAnimation
from src.util.config_loader import ConfigLoader

# 加载配置
config = ConfigLoader.load_config('config/multi_star_config.json')

# 创建星体和系统
stars = ConfigLoader.create_stars_from_config(config)
system = MultiStarSystem(stars)

# 获取绘图元数据和模拟参数
bodies_info = ConfigLoader.create_bodies_info_from_config(config)
sim_params = ConfigLoader.get_simulation_params(config)

# 运行动画
StarAnimation(
    bodies_info=bodies_info,
    system=system,
    **sim_params
).run(show=True)